projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f74d811
)
* lisp/textmodes/css-mode.el (css--hex-color): Trivial simplification
author
Stefan Monnier
<monnier@iro.umontreal.ca>
Sat, 16 Dec 2017 22:43:38 +0000
(17:43 -0500)
committer
Stefan Monnier
<monnier@iro.umontreal.ca>
Sat, 16 Dec 2017 22:43:38 +0000
(17:43 -0500)
lisp/textmodes/css-mode.el
patch
|
blob
|
history
diff --git
a/lisp/textmodes/css-mode.el
b/lisp/textmodes/css-mode.el
index 96c3f6b9395b6a7da1809aa84f1be70b18df49dc..b0e66d397f07a246151deb028b0580f9c972a6e2 100644
(file)
--- a/
lisp/textmodes/css-mode.el
+++ b/
lisp/textmodes/css-mode.el
@@
-1037,9
+1037,7
@@
This recognizes CSS-color-4 extensions."
STR is the incoming CSS hex color.
This function simply drops any transparency."
;; Either #RGB or #RRGGBB, drop the "A" or "AA".
- (if (> (length str) 5)
- (substring str 0 7)
- (substring str 0 4)))
+ (substring str 0 (if (> (length str) 5) 7 4)))
(defun css--named-color (start-point str)
"Check whether STR, seen at point, is CSS named color.